package com.cake.liulanxiangzhu.repo;

import com.cake.liulanxiangzhu.pojo.entity.AdminCategory;

import java.util.List;

public interface ICategoryRedisRepository {

    /**
     * 数据在Redis中的前缀
     */
    String CATEGORY_KEY_PREFIX = "category:";
    /**
     * 数据项在Redis中的Key前缀
     */
    String CATEGORY_ITEM_KEY_PREFIX = CATEGORY_KEY_PREFIX + "item:";
    /**
     * 列表在Redis中的Key
     */
    String CATEGORY_LIST_KEY = CATEGORY_KEY_PREFIX + "list";
    /**
     * 所有数据的Key
     */
    String CATEGORY_ALL_KEYS_KEY = CATEGORY_KEY_PREFIX + "all-keys";



    void save(AdminCategory adminCategory);

    void saveList(List<AdminCategory> adminCategories);

    AdminCategory get(Integer categoryId);

    List<AdminCategory> getList();



}
